package com.gollum.common.enums;

import com.gollum.common.utils.StringUtils;

/**
 * 系统全局状态
 *
 * @author Herther
 * @version 1.0.0
 * @createTime 2022年08月27日 00:08:00
 */
public enum SystemStatus {

    NORMAL("0", "正常"){
        @Override
        public Boolean isStatus(String value){
            return StringUtils.equals(value, NORMAL.value);
        }
    },

    DISABLE("1", "停用"){
        @Override
        public Boolean isStatus(String value){
            return StringUtils.equals(value, DISABLE.value);
        }
    };

    private String value;
    private String name;

    public abstract Boolean isStatus(String value);

    SystemStatus(String value,String name){
        this.value =value;
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

}
